package basis.ioc;

public class BMW implements IVehicle {

    private int energy = 10;
    public static final String NAME = "BMW";

    public BMW() {
    }

    public BMW(int energy) {
        this.energy = energy;
    }

    @Override
    public void powerOn() {
        System.out.println("BMW power on");
    }

    @Override
    public int moveForward(int dis) {
        energy -= dis / 10;
        System.out.println("BMW move forward " + dis);
        return energy;
    }

    @Override
    public int getEnergy() {
        return this.energy;
    }
}
